﻿using Basic.FlowGatewayModule.Interface;
using Basic.FlowRemoteModel.Application;
using Basic.FlowRemoteModel.FlowAudit;
using Basic.FlowRemoteModel.FlowAudit.Model;
using WeDonekRpc.Client;
using WeDonekRpc.HttpApiGateway.Model;

namespace Basic.FlowGatewayModule.lmpl
{
    internal class FlowAuditLogService : IFlowAuditLogService
    {
        public void Cancel ( long id, long empId )
        {
            new CloseAudit
            {
                EmpId = empId,
                LogId = id
            }.Send();
        }

        public PagingResult<AuditLogItem> Query ( PagingParam<AuditLogQuery> obj )
        {
            return new QueryAuditLog
            {
                Index = obj.Index,
                Size = obj.Size,
                SortName = obj.SortName,
                IsDesc = obj.IsDesc,
                NextId = obj.NextId,
                Query = obj.Query
            }.Send();
        }
    }
}
